{% load i18n future pages_tags %}

{% spaceless %}
{% if page_branch_in_menu %}
<ul class="nav nav-list navlist-menu-level-{{ branch_level }}">
  {% for page in page_branch %}
  {% if page.is_primary and forloop.first %}
  <li class="first{% if on_home %} active{% endif %}">
    <a href="{% url "home" %}">{% trans "Home" %}</a>
  </li>
  {% endif %}
  {% if page.in_menu %}
  <li class="
             {% if page.is_current %} active{% endif %}
             {% if not page.is_primary and forloop.first %} first{% endif %}
             {# {% if forloop.last %} last{% endif %} #}"
      id="tree-menu-{{ page.html_id }}">
    <a href="{{ page.get_absolute_url }}">{{ page.title }}</a>
    {# remove this if tag to always show all nav items #}
    {% if settings.PAGES_MENU_SHOW_ALL or page.is_current_or_ascendant %}
    {% if page.has_children_in_menu %}{% page_menu page %}{% endif %}
    {% endif %}
  </li>
  {% endif %}
  {% endfor %}
  {% if request.user.is_authenticated %}
	{% url "plays_status" as plays_status %}
	<li class="{% if request.path == plays_status %}active{% endif %}">
		<a href="{{ plays_status }}">{% trans "Plays Status" %}</a>
	<li>    
	{% url "shop_order_history" as order_history_user %}
	<li class="last{% if request.path == order_history_user %} active{% endif %}">
		<a href="{{ order_history_user }}">{% trans "Order History" %}</a>
	<li>  
  {% endif %}  
</ul>
{% endif %}
{% endspaceless %}
